Gforth’s libcc C Function Call Interface
نویسنده
چکیده
A major problem in our earlier proposal for a C interface was that a part of the interface was not portable between platforms. The libcc interface solves this problem by using a C compiler and its .h-files. The .h-files contain knowledge about the specific platform, and the C compiler automatically inserts the necessary conversions between Forth and C types. In this paper we describe the libcc implementation and interface. We also discuss how a Forth-C interface might be standardized.
منابع مشابه
A Portable C Function Call Interface
Many Forth systems provide means to call C functions, but these interfaces are not designed to be portable between platforms: A call to a C library function that works on one platform may fail on the next platform, because the parameter and return value types of the C function may be different. In this paper, we present an interface that avoids this problem: In particular, the actual calls can ...
متن کاملStack Caching in Forth
Stack caching speeds Forth up by keeping stack items in registers, reducing the number of memory accesses for stack items. This paper describes our work on extending Gforth’s stack caching implementation to support more than one register in the canonical state, and presents timing results for the resulting Forth system. For single-representation stack caches, keeping just one stack item in regi...
متن کاملA Portable C Interface for Standard ML of New Jersey
This paper describes the design and implementation of an interface to C for the SML/NJ ML compiler. The interface supplies ML datatypes with which programmers specify C types and C data. An ML program uses these datatypes to register a foreign C function with the interface and to build speci cations of structured C data. The interface automatically instantiates C function arguments from C data ...
متن کاملInvestigation of the Improvement of Energy Generation by Pressure Retarded Osmosis
Knowing the overall solute flux and the partial fluxes expressed by every single transport layer, the membrane internal interface concentrations can separately be expressed. Both the overall transport coefcient and the driving force strongly depend, among others, on the value of the structural parameter and the water permeability. Study of the interface concentrations as ...
متن کاملForeign Library Interface
We present an improved Foreign Function Interface (FFI) for R to call arbitary native functions without the need for C wrapper code. Further we discuss a dynamic linkage framework for binding standard C libraries to R across platforms using a universal type information format. The package rdyncall comprises the framework and an initial repository of crossplatform bindings for standard libraries...
متن کامل